<?php
$file = "hello.jpg";
function extend_2($file_name)
{
    $extend = pathinfo($file_name);
    $extend = strtolower($extend["extension"]);
    echo $extend;
}

extend_2($file);